package com.homson.coreservice.servicecommon.expection;

import com.homson.coreservice.servicecommon.enumeration.ResponseCodeEnum;
import lombok.Data;

/**
 * @author: homson_leo
 * @contact: hey_超级巨星（Homson_Leo）- 刘泓岑 1196816884@qq.com
 * @time: 2025/10/4 12:44 PM
 **/
@Data
public class SystemException extends Exception{
    private int code;
    private String msg;
    private String errorDetail;
    
    public SystemException(int code, String msg, String errorDetail) {
        this.code = code;
        this.msg = msg;
        this.errorDetail = errorDetail;
    }
    
    public SystemException(String msg){
        this.code= ResponseCodeEnum.INTERNAL_SERVER_ERROR.getCode();
        this.msg=msg;
    }
}
